package shenfen;

import book.BookList;

import javax.imageio.stream.ImageInputStream;
import javax.swing.plaf.synth.SynthOptionPaneUI;
import java.util.Scanner;

public class Test {
    public static User login() {
        Scanner scanner = new Scanner(System.in);  //从键盘输入
        System.out.println("请输入你的姓名： ");
        String name = scanner.nextLine();//输入一个字符串
        System.out.println("请输入你的身份： 1 》管理员  0 》 普通用户");
        int choice = scanner.nextInt();  //输入一个整数
        if(choice == 1){
            return new GuanLiYuan(name);
        }else{
            return new PuTong(name);
        }
    }

    public static void main(String[] args) {
        BookList bookList = new BookList();
    }
}
